﻿using System;
using System.ComponentModel;
using System.Linq.Expressions;
using SoftSource.Common;
using SoftSource.Timecard.ViewModelInterfaces;

namespace SoftSource.Timecard.ViewModels
{
    public sealed class AutoFormEditorViewModel : IAutoFormEditorViewModel
    {
        #region IAutoFormEditorViewModel Members

        public object Value { get; set; }

        public IObservable<Unit> Load { get; set; }

        #endregion

        #region IEditor Members

        public Action Cancel { get; set; }
        public IObservable<Unit> Save { get; set; }
        public IObservable<Unit> Apply { get; set; }
        public Action<Exception> Failure { get; set; }

        #endregion

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            GC.SuppressFinalize(this);
        }

        #endregion

        ~AutoFormEditorViewModel()
        {
            this.Dispose();
        }
    }
}
